﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using TRACv2.Domain.DTO;
using TRACv2.Domain.Interfaces.IRepository;
using TRACv2.Domain.Services;
using TRACv2.Persistence;
using TRACv2.UI.Facade;

namespace TRACv2.UI.Test
{
    [TestClass]
    public class TRACFacadeTest
    {
        private readonly TRACFacade _testFacade = new TRACFacade(new TicketService(new TicketRepository()), new EmployeeService(new EmployeeRepository()));
        [TestMethod]
        public void GetTicketTable_EmptyListArgument_ReturnsEmptyDataTable()
        {
            //Arrange
            var ticketList = new List<TicketDTO>();

            //Act
            var testTable = _testFacade.GetTicketTable(ticketList);

            //Assert
            Assert.IsNotNull(testTable);
        }

        public void FilterEmployeeList_NullStringArgument_NoFilterApplied()
        {
            //Arrange
            string testString = null;

            //Act
            _testFacade.FilterEmployeeList(testString);

            //Assert
            Assert.IsTrue(true);
        }

        public void FilterEmployeeList_EmptyStringArgument_NoFilterApplied()
        {
            //Arrange
            var testString = "";

            //Act
            _testFacade.FilterEmployeeList(testString);

            //Assert
            Assert.IsTrue(true);
        }
    }
}
